//package com.example.activemq;
//
//import org.springframework.jms.annotation.JmsListener;
//import org.springframework.stereotype.Component;
//
//@Component
//public class MessageConsumer {
//
//    @JmsListener(destination = "sample.queue",containerFactory = "jmsListenerContainerQueue")
//    public void receiveQueue1(String text) {
//        System.out.println("Consumer1="+text);
//    }
//
//    @JmsListener(destination = "sample.queue",containerFactory = "jmsListenerContainerQueue")
//    public void receiveQueue2(String text) {
//        System.out.println("Consumer2="+text);
//    }
//
//    @JmsListener(destination = "sample.topic",containerFactory = "jmsListenerContainerTopic")
//    public void receiveTopic1(String text) {
//        System.out.println("Consumer1="+text);
//    }
//    @JmsListener(destination = "sample.topic",containerFactory = "jmsListenerContainerTopic")
//    public void receiveTopic2(String text) {
//        System.out.println("Consumer2="+text);
//    }
//
//}
